import request from '@/utils/request'

// 新增download日志
export function addDownload(data) {
    return request({
      url: '/pms/log/download/add',
      method: 'post',
      data: data
    })
}

// 获取S3服务器的下载地址
export function getDownloadUrl(bucket,downloadName,docId) {
  return request({
    url: '/common/S3download?bucketName='+bucket+'&objectKey='+downloadName+'&docId='+docId,
    method: 'get'
  })
}

// 获取文档状态预览的权限
export function getPreviewPermissions(stateId) {
  return request({
    url: '/common/S3download?stateId='+stateId,
    method: 'get'
  })
}


